Set Environment Variables - Tomcat
For Windows deployment we need to create setenv.bat file in the bin folder of extracted Tomcat directory.
For Linux deployment we need to create setenv.sh file in the bin folder of extracted Tomcat directory.
The following configuration needs to be placed in the setenv.bat file for Windows environment.
Some Highlights before arguments changes
-
You can configure the cache name in the setenv.sh file for both the Cycle Server and Cycle Client by adding -Dexecutor.name=xxx to the CATALINA_OPTS. If not specified, the default cache name is "Single-Cache".
-
Make sure you specify "-Dtangosol.coherence.mode=prod" in both cycle server and client in setenv.sh to enable coherence run in Production mode.
Classpath Arguments
|
set CATALINA_OPTS=-Xms128m -Xmx1024m -XX:+UseG1GC -Dtangosol.coherence.cacheconfig="C:/<Server Path>/shared/conf/cycle-coherence-cache-config.xml" -Dtangosol.pof.config=com-adminserver-pas-web-pof-config.xml -Dtangosol.coherence.override="C:/<Server Path>/shared/conf/cycle-coherence-config.xml" -Dtangosol.coherence.distributed.localstorage=true -Djava.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory -Dtangosol.coherence.mode=prod -Djava.util.logging.config.file="C:/<Server Path>/shared/conf/logging.properties" -Dserver.name="<Name of the server>" set OIPA_KEYSTORE_PWD=changeit |
For Linux env in setenv.sh
Linux Class Path
|
export CATALINA_OPTS="-Xms128m -Xmx1024m -XX:+UseG1GC -Dtangosol.coherence.cacheconfig=/Servers/Tomcat/shared/conf/cycle-coherence-cache-config.xml -Dtangosol.pof.config=com-adminserver-pas-web-pof-config.xml -Dtangosol.coherence.override=/Servers/Tomcat/shared/conf/cycle-coherence-config.xml -Dtangosol.coherence.distributed.localstorage=true -Dtangosol.coherence.mode=prod -Djava.util.logging.config.file=/Servers/Tomcat/shared/conf/logging.properties -Djava.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory -Dserver.name=<Name of the server>" export OIPA_KEYSTORE_PWD="changeit" |
Note:
-
To enable remote debugging
Debug
-agentlib:jdwp=transport=dt_socket,address=1044,server=y,suspend=n
-
To Enable JMX events to Admin console application
Add to existing class path
|
-Dcom.sun.management.jmxremote.ssl=false - Dcom.sun.management.jmxremote.authenticate=false - Dcom.sun.management.jmxremote.autodiscovery=true - Dcom.sun.management.jmxremote.port=<Unique Port Number> |
If servers JMX port is not getting exposed to jconsole or adminconsole use below argument as well in that server arguments. ip address should be server actual ip address.
Rmi Port
-Djava.rmi.server.hostname=ipaddress |